package com.ease.platform.access.service.impl;

import java.util.List;

import com.ease.common.vo.Ordering;
import com.ease.model.DatabaseTable;
import com.ease.model.criteria.DatabaseTableCriteria;
import com.ease.platform.access.service.DatabaseTableAccessService;

/**
 * 
 * @author nathanleewei
 * 
 */
public class DatabaseTableAccessServiceImpl extends AbstractParameterizedBeanJdbcTemplateAccessServiceImpl<DatabaseTable> implements DatabaseTableAccessService {

	public List<DatabaseTable> findAll(Ordering ordering) {
		return find(null);
	}

	public DatabaseTable findByTableName(String tableName) {
		DatabaseTableCriteria databaseTableCriteria = new DatabaseTableCriteria();
		databaseTableCriteria.setTableName(tableName);
		return firstOne(find(databaseTableCriteria));
	}
}
